;Place Line under text strings. (on same layer).
;
;	AUTHOR: HENRY C. FRANCIS
;		425 N. ASHE ST.
;		SOUTHERN PINES, NC 28387
;		All rights reserved without prejudice.
;	Copyright:      1-26-96
;	Edited:		1-26-96
;
(defun c:txtlin (/ ss sslen count oldss delold ntz tname tent tp1
tang tbang tp2 bxp1 bxp2 bxp3 bxp4 )
(setvar "cmdecho" 0)
(c:svlayr)
(setq cr (list "w" "o" "r" "y" "d" "u" "e" "t" "h" "f" "a"
                   "g" "n" "c" "i" "p" "r" "s" "j" "l" "v" "b")
      wrd1 (strcat                      ;Copyright
             (strcase(nth 13 cr))
             (nth 1 cr)
             (nth 15 cr)
             (nth 3 cr)
             (nth 2 cr)
             (nth 14 cr)
             (nth 11 cr)
             (nth 8 cr)
             (nth 7 cr))
      wrd2 " "
	wrd3  (STRCAT (ITOA 1996) "-" (ITOA 2015))
      wrd4 ", "
      wrd4b (strcat                     ;by
             (nth 21 cr)
             (nth 3 cr))
      wrd5 (strcat                      ;Henry
             (strcase(nth 8 cr))
             (nth 6 cr)
             (nth 12 cr)
             (nth 2 cr)
             (nth 3 cr))
      wrd6 (strcase(nth 13 cr))         ;C
      wrd6a ". "
      wrd7 (strcat                      ;Francis
             (strcase(nth 9 cr))
             (nth 2 cr)
             (nth 10 cr)
             (nth 12 cr)
             (nth 13 cr)
             (nth 14 cr)
             (nth 17 cr))
      wrd8 (strcat                      ;without
             (nth 0 cr)
             (nth 14 cr)
             (nth 7 cr)
             (nth 8 cr)
             (nth 1 cr)
             (nth 5 cr)
             (nth 7 cr))
      wrd9 (strcat                      ;prejudice
             (nth 15 cr)
             (nth 2 cr)
             (nth 6 cr)
             (nth 18 cr)
             (nth 5 cr)
             (nth 4 cr)
             (nth 14 cr)
             (nth 13 cr)
             (nth 6 cr))
      wrd10 (strcat                     ;All
             (strcase(nth 10 cr))
             (nth 19 cr)
             (nth 19 cr))
      wrd11 (strcat                     ;rights
             (nth 2 cr)
             (nth 14 cr)
             (nth 11 cr)
             (nth 8 cr)
             (nth 7 cr)
             (nth 17 cr))
      wrd12 (strcat                     ;reserved
             (nth 2 cr)
             (nth 6 cr)
             (nth 17 cr)
             (nth 6 cr)
             (nth 2 cr)
             (nth 20 cr)
             (nth 6 cr)
             (nth 4 cr))
)
(if
(not(eq(strcat(nth 3 cr)(nth 6 cr)(nth 17 cr))"yes"))
(princ "Copyright has been violated! ")
(progn
     (setq ss (ssget '((0 . "TEXT"))
	      )
     )
  (setq sslen (sslength ss)
        count 0
  );setq
(c:mklayr)
(setq count 0)
(while (not(eq sslen count))
  (setq tname (ssname ss count)
        tent (entget tname)
        tp1 (cdr(assoc 10 tent))
        tbox (textbox tent)
        txht (cdr(assoc 40 tent))
        tdis (distance (nth 0 tbox)(nth 1 tbox))
        tang (cdr(assoc 50 tent))
        tlayr (cdr(assoc 8 tent))
        tbang
          (if (> tdis 0)
            (+ tang(atan txht (sqrt(-(* tdis tdis)(* txht txht)))))
            0
          );if
        tp2 (polar tp1 tbang tdis)
        bxp1 (polar tp1 (- tang(* pi 0.75))(* 1.414214(/ txht 2.10)))
        bxp2 (polar bxp1 (+ tang(* pi 0.50))(+(* 2.00(/ txht 2.10))txht))
        bxp4 (polar tp2 (+ tang(* pi 0.25))(* 1.414214(/ txht 2.10)))
        bxp3 (polar bxp4 (- tang(* pi 0.50))(+(* 2.00(/ txht 2.10))txht))
        bxp1 (trans(list(car bxp1)(cadr bxp1)0)0 1)
        bxp2 (trans(list(car bxp2)(cadr bxp2)0)0 1)
        bxp3 (trans(list(car bxp3)(cadr bxp3)0)0 1)
        bxp4 (trans(list(car bxp4)(cadr bxp4)0)0 1)
  );setq
  (setvar "clayer" tlayr)
  (if (> tdis 0)
    (command ".line" bxp1 bxp3 "")
  );if
  (setq count (1+ count))
);while
(c:rslayr)
);progn
)
(princ wrd1)
(princ wrd2)
(princ wrd3)
(princ wrd2)
(princ wrd4b)
(princ wrd2)
(princ wrd5)
(princ wrd2)
(princ wrd6)
(princ wrd6a)
(princ wrd7)
(princ wrd4)
(princ wrd10)
(princ wrd2)
(princ wrd11)
(princ wrd2)
(princ wrd12)
(princ wrd2)
(princ wrd8)
(princ wrd2)
(princ wrd9)
(princ wrd6a)
(princ)
);defun